package JSE_04.Demo10;

import java.util.Arrays;

public class Demo10Main {
    public static void main(String[] args) {
        int[] arr={45,44,3864,1234,14};

        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));

        invokeCook(new Cook(){
            @Override
            public void makeFood(){
                System.out.println("吃饭了");
            }
        });


        invokeCook(()->{
            System.out.println("我也吃了");
        });
    }

    public static void invokeCook(Cook cook){
        cook.makeFood();
    }
}
